package sg.edu.nus.iss.club;

import java.text.SimpleDateFormat;
import java.util.Date;

public class ClubApplicationConsole {

    public static void main (String args[]) throws Exception  {

        Club club = new Club ();

        Member removableMember;

        club.addMember ("Einstein", "Albert", null);
        club.addMember ("Picasso", "Pablo", "Ruiz");
        removableMember = club.addMember ("Webber","Andrew","Lloyd");
        club.addMember ("Baggio", "Roberto", null);
        club.addMember ("Raffles", "Stamford", null);

        System.out.println ("Current Members:");
        club.showMembers ();

        System.out.println ("Deleting " + removableMember);
        int id = removableMember.getMemberNumber ();
        club.removeMember (id);

        System.out.println ("Current members:");
        club.showMembers ();
        
        
        SimpleDateFormat dateFormat = new SimpleDateFormat("d-MMM-yyyy H:mm");
        Date date1 = dateFormat.parse("1-MAR-2010 15:00");
        Date date2 = dateFormat.parse("10-MAR-2010 15:00");
        Facility fac = new Facility("Screw", "Screw Driver");
        club.addFacility("Screw", "Screw Driver");
        
        Booking b = new Booking(club.getMember(1), fac, date1, date2);
        System.out.println(b);
        
        club.addBooking(1, "Screw", date1, date2);
        
        date1 = dateFormat.parse("10-MAR-2010 16:00");
        date2 = dateFormat.parse("13-MAR-2010 15:00");
        
        club.addBooking(2, "Screw", date1, date2);
        
    }

}
